package com.zxn.ssyx.controller;

import com.zxn.ssyx.common.result.Result;
import com.zxn.ssyx.service.RegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sun.security.provider.certpath.PKIXTimestampParameters;

@RestController
@RequestMapping("/admin/sys/region")
@Api(tags = "区域接口")
@CrossOrigin
public class RegionController {

    @Autowired
    private RegionService regionService;

    @ApiOperation(value = "根据关键字获取地区列表")
    @GetMapping("/findRegionByKeyword/{keyword}")
    public Result findSkuInfoByKeyWord(@PathVariable String keyword){
        return Result.ok(regionService.findRegionByKeyWord(keyword));
    }
}
